<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.hfjyz.system.user.bean.UserBean"%>
<%@ page import="com.hfjyz.base.bean.MenuBean"%>
<%@ page import="com.hfjyz.code.bean.CodeBean"%>
<%@ page import="com.hfjyz.base.util.CodeUtil"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Map"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
UserBean user=(UserBean) session.getAttribute("UserInfoKey");
String userName = user.getUserName();
String userId = user.getUserId();

@SuppressWarnings("unchecked")
List<MenuBean> menuList = (List<MenuBean>) session.getAttribute("MenuInfoKey");
Map<Integer, List<CodeBean>> codeMap = CodeUtil.getCodeMap();
List<CodeBean> sexCodeList = codeMap.get(1);
List<CodeBean> educationCodeList = codeMap.get(2);
List<CodeBean> educationTypeCodeList = codeMap.get(3);
List<CodeBean> callAimCodeList = codeMap.get(5);
%>

<script>
var sexArray = new Array();
<% if (sexCodeList != null) for (int i = 0; i < sexCodeList.size(); i++) { 
    CodeBean sexCode = sexCodeList.get(i);
    Integer code = sexCode.getCode();
    String text = sexCode.getText();%>
var o = {code:<%=code%>, text:'<%=text%>'};
sexArray.push(o);
<% } %>
var educationArray = new Array();
<% if (educationCodeList != null) for (int i = 0; i < educationCodeList.size(); i++) { 
    CodeBean educationCode = educationCodeList.get(i);
    Integer code = educationCode.getCode();
    String text = educationCode.getText();%>
var o = {code:<%=code%>, text:'<%=text%>'};
educationArray.push(o);
<% } %>
var educationTypeArray = new Array();
<% if (educationTypeCodeList != null) for (int i = 0; i < educationTypeCodeList.size(); i++) { 
    CodeBean educationTypeCode = educationTypeCodeList.get(i);
    Integer code = educationTypeCode.getCode();
    String text = educationTypeCode.getText();%>
var o = {code:<%=code%>, text:'<%=text%>'};
educationTypeArray.push(o);
<% } %>
var callAimArray = new Array();
<% if (callAimCodeList != null) for (int i = 0; i < callAimCodeList.size(); i++) { 
    CodeBean callAimCode = callAimCodeList.get(i);
    Integer code = callAimCode.getCode();
    String text = callAimCode.getText();%>
var o = {code:<%=code%>, text:'<%=text%>'};
callAimArray.push(o);
<% } %>

</script><!--
  <div id="header">
   <script type="text/javascript">
   AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0', 'width', '958', 'height',
     '145', 'src', 'media/ban3', 'quality', 'high', 'pluginspage', 'http://www.macromedia.com/go/getflashplayer', 'movie', 'media/ban3',
     'wmode', 'transparent');
   </script>
   <noscript>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
     width="958" height="145">
     <param name="movie" value="media/ban3.swf" />
     <param name="quality" value="high" />
     <param name="wmode" value="transparent" />
     <embed src="media/ban3.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="958"
      height="145"></embed>
    </object>
   </noscript>
  </div>-->
  <div id="logoContainer">
   <div id="logo">
    <img src="image/logo.jpg" />
   </div>
   <div id="logout">
    <div id="user">
    <marquee behavior="alternate" onMouseOut="this.start()" onMouseOver="this.stop()">
    欢迎您，<%= userName %>
    </marquee></div>
    <div id="logoutlink">
     <a href="logout.action">注销</a>
    </div>
   </div>
  </div>

  <div id="menuContainer">
   <div id="leftContainer"></div>
   <div id="centerContainer">
    <% for (MenuBean menu : menuList) { %>
     <div class="menu">
     <%= menu.getText() %>
     <ul class="menuItem">
       <% for (MenuBean subMenu : menu.getMenu()) { %>
      <li><a href="<%= subMenu.getUrl()%>"><%= subMenu.getText()%></a></li>
       <% } %>
     </ul>
    </div>
    <% } %>
   </div>
   <div id="rightContainer"></div>
  </div>